package com.engineering.elink.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.engineering.elink.co.recruit.CvdBaseInfoCo;
import com.engineering.elink.co.recruit.CvdDataSearchCo;
import com.engineering.elink.co.recruit.CvdJobIntentionCo;
import com.engineering.elink.co.recruit.CvdSearchCo;
import com.engineering.elink.co.recruit.EducationExperienceAddCo;
import com.engineering.elink.co.recruit.ProjectExperienceAddCo;
import com.engineering.elink.co.recruit.WorkExperienceAddCo;
import com.engineering.elink.common.DictConstant;
import com.engineering.elink.common.ErrorType;
import com.engineering.elink.service.CvDatabaseService;
import com.engineering.elink.service.JobService;
import com.engineering.elink.util.ResJsonUtil;

@RestController
@CrossOrigin
@RequestMapping("/api/cvdatabase")
@Api(value="简历相关接口")
public class CvDatabaseController {
	
	@Autowired
	private JobService jobService;
	
	@Autowired
	private CvDatabaseService cvDatabaseService;
	
	/**
	 * 获取求职状态
	 */
	@RequestMapping(value = "/getJobStatus", method = RequestMethod.GET)
	@ApiOperation(value = "获取求职状态")
	public Map<String, Object> getJobStatus() {
		
		return ResJsonUtil.getMap(ErrorType.SUCCESS,jobService.getDictCategoryByCode(DictConstant.JOB_STATUS,0));
	}
	
	/**
	 * 获取证件类型
	 */
	@RequestMapping(value = "/getCardType", method = RequestMethod.GET)
	@ApiOperation(value = "获取证件类型", response = ResponseObject.class)
	public Map<String, Object> getCardType() {
		return ResJsonUtil.getMap(ErrorType.SUCCESS,cvDatabaseService.getCardType());
	}
	
	/**
	 * 获取政治面貌
	 */
	@RequestMapping(value = "/getPoliticalStatus", method = RequestMethod.GET)
	@ApiOperation(value = "获取政治面貌", response = ResponseObject.class)
	public Map<String, Object> getPoliticalStatus() {
		
		return ResJsonUtil.getMap(ErrorType.SUCCESS,jobService.getDictCategoryByCode(DictConstant.POLITICAL_STATUS,0));
	}
	
	/**
	 * 获取企业行业
	 */
	@RequestMapping(value = "/getCompanyGuild", method = RequestMethod.GET)
	@ApiOperation(value = "获取企业行业", response = ResponseObject.class)
	public Map<String, Object> getCompanyGuild() {
		
		return ResJsonUtil.getMap(ErrorType.SUCCESS,jobService.getDictCategoryByCode(DictConstant.COMPANY_GUILD,5));
	}
	
	/**
	 * 设置公开
	 */
	@RequestMapping(value = "/updateOpen", method = RequestMethod.PUT)
	@ApiOperation(value = "设置公开", response = ResponseObject.class)
	public Map<String, Object> updateOpen(@ApiParam(value="简历ID",required=true) @RequestParam("cvdId") String cvdId,
			@ApiParam(value = "是否公开(0不公开1公开)", required = true) @RequestParam("open") int open) {
		
		return cvDatabaseService.updateOpen(cvdId,open);
		
	}
	
	/**
	 * 保存简历求职意向
	 */
	@RequestMapping(value="/saveJobIntention",method = RequestMethod.POST)
	@ApiOperation(value = "保存简历求职意向")
	public Map<String, Object> saveJobIntention(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
			@ModelAttribute @Valid CvdJobIntentionCo jobIntentionCo,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.saveJobIntention(cvdId,jobIntentionCo,userId);
	}
	
	/**
	 * 保存简历基本信息
	 */
	@RequestMapping(value="/saveBaseInfo",method = RequestMethod.POST)
	@ApiOperation(value = "保存简历基本信息")
	public Map<String, Object> saveBaseInfo(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
			@ModelAttribute @Valid CvdBaseInfoCo baseInfoCo,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.saveBaseInfo(cvdId,baseInfoCo,userId);
	}
	
	/**
	 * 获取公司规模
	 */
	@RequestMapping(value = "/getCompanyScale", method = RequestMethod.GET)
	@ApiOperation(value = "获取公司规模", response = ResponseObject.class)
	public Map<String, Object> getCompanyScale() {
		
		return ResJsonUtil.getMap(ErrorType.SUCCESS,jobService.getDictCategoryByCode(DictConstant.COMPANY_SCALE,4));
	}
	
	/**
	 * 获取公司性质
	 */
	@RequestMapping(value = "/getCompanyNature", method = RequestMethod.GET)
	@ApiOperation(value = "获取公司性质", response = ResponseObject.class)
	public Map<String, Object> getCompanyNature() {
		
		return ResJsonUtil.getMap(ErrorType.SUCCESS,jobService.getDictCategoryByCode(DictConstant.COMPANY_NATURE,1));
	}
	
	/**
	 * 保存工作经验

	 */
//	@RequestMapping(value="/saveWorkExperience",method = RequestMethod.POST)
//	@ApiOperation(value = "批量保存工作经验")
//	public Map<String, Object> saveWorkExperience(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
//			@ApiParam(value="工作经验JSON字符串([{\"weId\":0,\"startTime\":\"2016-12-01 01:01:01\",\"endTime\":\"2017-02-01 01:01:01\",\"guildId\":\"2\",\"companyName\":\"大联科技\",\"scaleId\":\"1\",\"fdcId\":\"1\",\"natureId\":\"1\",\"department\":\"技术部\",\"jobNatureId\":\"1\",\"salaryId\":\"1\",\"introduction\":\"工作描述\",\"overseas\":\"1\"},{\"weId\":0,\"startTime\":\"2016-12-01 01:01:01\",\"endTime\":\"2017-02-01 01:01:01\",\"guildId\":\"2\",\"companyName\":\"大联科技\",\"scaleId\":\"1\",\"fdcId\":\"1\",\"natureId\":\"1\",\"department\":\"技术部\",\"jobNatureId\":\"1\",\"salaryId\":\"1\",\"introduction\":\"工作描述\",\"overseas\":\"1\"}]wedId为0新增)",required=true)
//			@RequestParam(value="jsonStr")String jsonStr,HttpServletRequest request){
//		
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
//		String userId =  userInfo.get("userId").toString();
//		
//		return cvDatabaseService.saveWorkExperience(cvdId,jsonStr,userId);
//	}
	
	/**
	 * 保存简历工作经验
	 */
	@RequestMapping(value="/saveWorkExp",method = RequestMethod.POST)
	@ApiOperation(value = "保存简历工作经验")
	public Map<String, Object> saveWorkExp(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
			@ModelAttribute @Valid WorkExperienceAddCo workCo,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.saveWorkExp(cvdId,workCo,userId);
	}
	
	/**
	 * 更新简历工作经验
	 */
	@RequestMapping(value="/updateWorkExp",method = RequestMethod.POST)
	@ApiOperation(value = "更新简历工作经验")
	public Map<String, Object> updateWorkExp(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
			@ApiParam(value="工作经验id",required=true) @RequestParam(value = "weId",required=true)int weId,
			@ModelAttribute @Valid WorkExperienceAddCo workCo,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.updateWorkExp(cvdId,weId,workCo,userId);
	}
	
	/**
	 * 删除简历工作经验
	 */
	@RequestMapping(value="/deleteWorkExp",method = RequestMethod.DELETE)
	@ApiOperation(value = "删除简历工作经验")
	public Map<String, Object> deleteWorkExp(
			@ApiParam(value="工作经验id",required=true) @RequestParam(value = "weId",required=true)int weId){
		
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
//		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.deleteWorkExp(weId,"");
	}
	
	
	/**
	 * 批量保存教育经历
	 */
//	@RequestMapping(value="/saveEducationExperience",method = RequestMethod.POST)
//	@ApiOperation(value = "批量保存教育经历")
//	public Map<String, Object> saveEducationExperience(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
//			@ApiParam(value="教育经历JSON字符串([{\"eeId\":0,\"startTime\":\"2016-12-01 01:01:01\",\"endTime\":\"2017-02-01 01:01:01\",\"degreeId\":\"2\",\"eduName\":\"大联学校\",\"fulltimeStatus\":\"1\",\"professionalId\":\"1\",\"overseas\":\"1\",\"introduction\":\"专业描述\"}]eeId为0新增)",required=true)
//			@RequestParam(value="jsonStr")String jsonStr){
//		
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
//		String userId =  userInfo.get("userId").toString();
//		
//		return cvDatabaseService.saveEducationExperience(cvdId,jsonStr,userId);
//	}
	
	/**
	 * 保存简历教育经历
	 */
	@RequestMapping(value="/saveEduExp",method = RequestMethod.POST)
	@ApiOperation(value = "保存简历教育经历")
	public Map<String, Object> saveEduExp(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
			@ModelAttribute @Valid EducationExperienceAddCo eeCo,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.saveEduExp(cvdId,eeCo,userId);
	}
	
	/**
	 * 更新简历教育经历
	 */
	@RequestMapping(value="/updateEduExp",method = RequestMethod.POST)
	@ApiOperation(value = "更新简历教育经历")
	public Map<String, Object> updateEduExp(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
			@ApiParam(value="教育经历id",required=true) @RequestParam(value = "eeId",required=true)int eeId,
			@ModelAttribute @Valid EducationExperienceAddCo eeCo,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.updateEduExp(cvdId,eeId,eeCo,userId);
	}
	
	/**
	 * 删除简历教育经历
	 * @since JDK 1.8
	 */
	@RequestMapping(value="/deleteEduExp",method = RequestMethod.DELETE)
	@ApiOperation(value = "删除简历教育经历")
	public Map<String, Object> deleteEduExp(
			@ApiParam(value="教育经历id",required=true) @RequestParam(value = "eeId",required=true)int eeId){
		
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
//		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.deleteEduExp(eeId,"");
	}
	
	
	/**
	 * 批量保存项目经验
	 */
//	@RequestMapping(value="/saveProjectExperience",method = RequestMethod.POST)
//	@ApiOperation(value = "批量保存项目经验")
//	public Map<String, Object> saveProjectExperience(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
//			@ApiParam(value="项目经验JSON字符串([{\"peId\":0,\"startTime\":\"2016-12-01 01:01:01\",\"endTime\":\"2017-02-01 01:01:01\",\"companyName\":\"联动公司\",\"peName\":\"大联学校\",\"roleName\":\"管理员\",\"introduction\":\"项目描述\"}]peId为0新增)",required=true)
//			@RequestParam(value="jsonStr")String jsonStr){
//		
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
//		String userId =  userInfo.get("userId").toString();
//		
//		return cvDatabaseService.saveProjectExperience(cvdId,jsonStr,userId);
//	}
	
	/**
	 * 保存简历项目经验
	 */
	@RequestMapping(value="/saveProjectExp",method = RequestMethod.POST)
	@ApiOperation(value = "保存简历项目经验")
	public Map<String, Object> saveProjectExp(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
			@ModelAttribute @Valid ProjectExperienceAddCo peCo,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.saveProjectExp(cvdId,peCo,userId);
	}
	
	/**
	 * 更新简历项目经验
	 */
	@RequestMapping(value="/updateProjectExp",method = RequestMethod.POST)
	@ApiOperation(value = "更新简历项目经验")
	public Map<String, Object> updateProjectExp(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
			@ApiParam(value="项目经验id",required=true) @RequestParam(value = "peId",required=true)int peId,
			@ModelAttribute @Valid ProjectExperienceAddCo peCo,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.updateProjectExp(cvdId,peId,peCo,userId);
	}
	
	/**
	 * 删除简历项目经验
	 */
	@RequestMapping(value="/deleteProExp",method = RequestMethod.DELETE)
	@ApiOperation(value = "删除简历项目经验")
	public Map<String, Object> deleteProExp(
			@ApiParam(value="项目经验id",required=true) @RequestParam(value = "peId",required=true)int peId){
		
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
//		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.deleteProExp(peId,"");
	}
	
	
	/**
	 * 简历详情
	 */
	@RequestMapping(value="/get",method = RequestMethod.GET)
	@ApiOperation(value = "简历详情")
	public Map<String, Object> get(
			@ApiParam(value="用户id",required=false) @RequestParam(value = "userId",required=false)String userId,
			@ApiParam(value="简历id",required=false) @RequestParam(value="cvdId",required=false)String cvdId){
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) LocalUtil.get();
//		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.get(userId,cvdId);
		
	}
	
	/**
	 * 保存简历所有信息
	 */
	@RequestMapping(value="/saveCvdDatabase",method = RequestMethod.POST)
	@ApiOperation(value = "保存简历所有信息")
	public Map<String, Object> saveCvdDatabase(@ApiParam(value="简历id",required=false) @RequestParam(value = "cvdId",required=false)String cvdId,
			@ModelAttribute @Valid CvdBaseInfoCo baseInfoCo,@ModelAttribute @Valid CvdJobIntentionCo jobIntentionCo,
			@ApiParam(value="工作经验JSON字符串([{\"weId\":0,\"startTime\":\"2016-12-01 01:01:01\",\"endTime\":\"2017-02-01 01:01:01\",\"guildId\":\"2\",\"companyName\":\"大联科技\",\"scaleId\":\"1\",\"fdcId\":\"1\",\"natureId\":\"1\",\"department\":\"技术部\",\"jobNatureId\":\"1\",\"salaryId\":\"1\",\"introduction\":\"工作描述\",\"overseas\":\"1\"},{\"weId\":0,\"startTime\":\"2016-12-01 01:01:01\",\"endTime\":\"2017-02-01 01:01:01\",\"guildId\":\"2\",\"companyName\":\"大联科技\",\"scaleId\":\"1\",\"fdcId\":\"1\",\"natureId\":\"1\",\"department\":\"技术部\",\"jobNatureId\":\"1\",\"salaryId\":\"1\",\"introduction\":\"工作描述\",\"overseas\":\"1\"}]wedId为0新增)",required=true)
			@RequestParam("workJsonStr")String workJsonStr,
			@ApiParam(value="教育经历JSON字符串([{\"eeId\":0,\"startTime\":\"2016-12-01 01:01:01\",\"endTime\":\"2017-02-01 01:01:01\",\"degreeId\":\"2\",\"eduName\":\"大联学校\",\"fulltimeStatus\":\"1\",\"professionalId\":\"1\",\"overseas\":\"1\",\"introduction\":\"专业描述\"}]eeId为0新增)",required=true)
			@RequestParam("eduJsonStr")String eduJsonStr,
			@ApiParam(value="项目经验JSON字符串([{\"peId\":0,\"startTime\":\"2016-12-01 01:01:01\",\"endTime\":\"2017-02-01 01:01:01\",\"companyName\":\"联动公司\",\"peName\":\"大联学校\",\"roleName\":\"管理员\",\"introduction\":\"项目描述\"}]peId为0新增)",required=true)
			@RequestParam("projectJsonStr")String projectJsonStr,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.saveCvdDatabase(cvdId,baseInfoCo,jobIntentionCo,workJsonStr,eduJsonStr,projectJsonStr,userId);
		
	}
	
	/**
	 * 获取所有薪资
	 */
//	@RequestMapping(value = "/getSalary", method = RequestMethod.GET)
//	@ApiOperation(value = "获取所有薪资", response = ResponseObject.class)
//	public Map<String, Object> getSalary() {
//		return JSONUtil.getMap(ErrorType.SUCCESS,cvDatabaseService.getSalary());
//	}
	
	/**
	 * 获取所有薪资(或前几条)
	 */
	@RequestMapping(value = "/getSalaryCount", method = RequestMethod.GET)
	@ApiOperation(value = "获取所有薪资(或前几条)", response = ResponseObject.class)
	public Map<String, Object> getSalaryCount(@ApiParam(value="条数",required=false) @RequestParam(value = "count",required=false)Integer count) {
		return ResJsonUtil.getMap(ErrorType.SUCCESS,cvDatabaseService.getSalaryByLimit(count));
	}
	
	/**
	 * 招聘管理－应聘管理－最新简历
	 */
	@RequestMapping(value="/getCvdDeliveryList",method = RequestMethod.GET)
	@ApiOperation(value = "招聘管理－应聘管理－最新简历")
	public Map<String, Object> getCvdDeliveryList(@ModelAttribute @Valid CvdSearchCo co,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId=null;
		if(userInfo!=null && userInfo.get("userId")!=null){
			 userId =  userInfo.get("userId").toString();
		}
		
		return cvDatabaseService.getCvdDeliveryList(co,userId);
	}
	
	/**
	 * 批量移至简历库
	 */
	@RequestMapping(value = "/batchMoveCvd", method = RequestMethod.PUT)
	@ApiOperation(value = "批量移至简历库", response = ResponseObject.class)
	public Map<String, Object> batchMoveCvd(@ApiParam(value="简历投递IDs(1,2,3)",required=true) @RequestParam(value = "vdIds")String vdIds) {
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
//		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.batchMoveCvd(vdIds,"");
	}
	
	/**
	 * 招聘管理－应聘管理－简历库
	 */
	@RequestMapping(value="/getCvdCollectionList",method = RequestMethod.GET)
	@ApiOperation(value = "招聘管理－应聘管理－简历库")
	public Map<String, Object> getCvdCollectionList(@ModelAttribute @Valid CvdSearchCo co,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId=null;
		if(userInfo!=null && userInfo.get("userId")!=null){
			 userId =  userInfo.get("userId").toString();
		}
		
		return cvDatabaseService.getCvdCollectionList(co,userId);
	}
	
	/**
	 * 批量更新简历库状态
	 */
	@RequestMapping(value = "/batchUpdateCvdStatus", method = RequestMethod.PUT)
	@ApiOperation(value = "批量更新简历库状态", response = ResponseObject.class)
	public Map<String, Object> batchUpdateCvdStatus(@ApiParam(value="简历库IDs(1,2,3)",required=true) @RequestParam(value = "vcIds")String vcIds,
			@ApiParam(value="状态(0为已投递1为已面试2为已复试3为已录取,4已删除)",required=true) @RequestParam(value = "status")int status) {
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
//		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.batchUpdateCvdStatus(vcIds,status,"");
	}
	
	/**
	 * 批量更新投递简历状态
	 */
	@RequestMapping(value = "/batchUpdateCvdType", method = RequestMethod.PUT)
	@ApiOperation(value = "批量更新投递简历状态", response = ResponseObject.class)
	public Map<String, Object> batchUpdateCvdType(@ApiParam(value="投递简历IDs(1,2,3)",required=true) @RequestParam(value = "vdIds")String vdIds,
			@ApiParam(value="状态(0为已投递1为已面试2为已复试3为已录取,4已移至)",required=true) @RequestParam(value = "type")int type) {
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
//		String userId =  userInfo.get("userId").toString();
		
		return cvDatabaseService.batchUpdateCvdType(vdIds,type,"");
	}
	
	/**
	 * 招聘管理－搜索简历
	 */
	@RequestMapping(value="/getSearchCvdList",method = RequestMethod.GET)
	@ApiOperation(value = "招聘管理－搜索简历")
	public Map<String, Object> getSearchCvdList(@ModelAttribute @Valid CvdDataSearchCo co,HttpServletRequest request){
		
		@SuppressWarnings("unchecked")
		Map<String,Object> userInfo  = (Map<String, Object>) request.getAttribute("userInfo");
		String userId=null;
		if(userInfo!=null && userInfo.get("userId")!=null){
			userId =  userInfo.get("userId").toString();
		}
		
		return cvDatabaseService.getSearchCvdList(co,userId);
	}
	
}
